package guoanmaker.operator.business.controller;



import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import guoanmaker.operator.business.model.OperatorLoginAdminInformation;

import guoanmaker.operator.business.service.OperatorLoginAdminInformationServiceIntegerface;
import guoanmaker.operator.helper.common.AjaxJson;
import guoanmaker.operator.helper.common.abstractobj.ApiController;
import io.swagger.annotations.ApiOperation;

@Controller
@RequestMapping(ApiController.OPERATOR_ADMININFOMATION)
public class OperatorLoginAdminInformationController {
	@Autowired
	private AjaxJson ajaxJson;
	@Autowired
	private OperatorLoginAdminInformationServiceIntegerface operatorLoginAdminInformationServiceIntegerface;
	
	@ApiOperation(value = "登录管理人信息", notes = "新增/修改登录管理人信息")
    @PostMapping(value = "saveOperatorLoginBackground")
    public AjaxJson saveAdminInformation(@RequestBody OperatorLoginAdminInformation operatorLoginAdminInformation) {
        return ajaxJson.setSuccess(true).setStatus(200).setData(operatorLoginAdminInformationServiceIntegerface.saveAdminInformation(operatorLoginAdminInformation));
    }
	
	@ApiOperation(value = "根据Id查找登录管理人信息", notes = "根据Id查登录管理人信息")
	 @RequestMapping(value = "/getLoginAdminInformationById", method = RequestMethod.POST)
	public AjaxJson getLoginAdminInformationById(@RequestParam(value = "id") String id) {
	     return ajaxJson.setSuccess(true).setStatus(200).setData(operatorLoginAdminInformationServiceIntegerface.getAdminInformationById(id)
	    		 );
	 }

}
